import React from 'react';
import "./App.css";
import { useAuth } from 'context/auth-context';
import AuthenticatedApp from 'AuthenticatedApp';
import UnauthenticatedApp from 'unauthenticated-app';
import ErrorBoundary from './components/CErrorBoundary';
import { FullPageErrorFallback } from 'components/lib';
import CErrorBoundary from './components/CErrorBoundary';
import { DragDropContext } from 'react-beautiful-dnd';

// function App() {
//   return (
//     <div className="App">
//       <ProjectList></ProjectList>
//       <hr />
//       <TryUserArray></TryUserArray>
//       <hr />
//       <LoginScreen></LoginScreen>
//     </div>
//   );
// }

// export default App;
function App(){
  const {user} = useAuth()
  return(
    <div className='App'>
      <CErrorBoundary fallbackRender={FullPageErrorFallback}>
      {
        user?<AuthenticatedApp />: <UnauthenticatedApp />
      }
      </CErrorBoundary>
    </div>
  )
}
export default  App